summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/HopperEntity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities/HopperEntity.h')
-rw-r--r--src/BlockEntities/HopperEntity.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h
index e11b2cc4d..c57dce672 100644
--- a/src/BlockEntities/HopperEntity.h
+++ b/src/BlockEntities/HopperEntity.h
@@ -19,7 +19,11 @@
class cHopperEntity :
public cBlockEntityWithItems
{
- typedef cBlockEntityWithItems Super;
+ // tolua_end
+
+ using super = cBlockEntityWithItems;
+
+ // tolua_begin
public:
enum
@@ -34,12 +38,12 @@ public:
BLOCKENTITY_PROTODEF(cHopperEntity)
/** Constructor used for normal operation */
- cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
+ cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
/** Returns the block coords of the block receiving the output items, based on the meta
- Returns false if unattached.
+ Returns <false, undefined> if unattached.
Exported in ManualBindings.cpp. */
- bool GetOutputBlockPos(NIBBLETYPE a_BlockMeta, int & a_OutputX, int & a_OutputY, int & a_OutputZ);
+ std::pair<bool, Vector3i> GetOutputBlockPos(NIBBLETYPE a_BlockMeta);
protected:
@@ -76,11 +80,11 @@ protected:
/** Moves one piece from the specified itemstack into this hopper. Returns true if contents have changed. Doesn't change the itemstack. */
bool MoveItemsFromSlot(cBlockEntityWithItems & a_Entity, int a_SrcSlotNum);
- /** Moves items to the chest at the specified coords. Returns true if contents have changed */
- bool MoveItemsToChest(cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ);
+ /** Moves items to the chest at the specified absolute coords. Returns true if contents have changed */
+ bool MoveItemsToChest(cChunk & a_Chunk, Vector3i a_Coords);
- /** Moves items to the furnace at the specified coords. Returns true if contents have changed */
- bool MoveItemsToFurnace(cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_HopperMeta);
+ /** Moves items to the furnace at the specified absolute coords. Returns true if contents have changed */
+ bool MoveItemsToFurnace(cChunk & a_Chunk, Vector3i a_Coords, NIBBLETYPE a_HopperMeta);
/** Moves items to the specified ItemGrid. Returns true if contents have changed */
bool MoveItemsToGrid(cBlockEntityWithItems & a_Entity);